import 'ant-design-vue/dist/reset.css'
import '@toast-ui/editor/dist/toastui-editor.css'
import 'prismjs/themes/prism-okaidia.css'
// import '@toast-ui/editor-plugin-code-syntax-highlight/dist/toastui-editor-plugin-code-syntax-highlight.css'
import './assets/main.less'
import './assets/editor.less'
import { InitAdapter } from './initialization/InitAdapter'
import { createApp, defineAsyncComponent } from 'vue'
import { createPinia } from 'pinia'
import router from './router'
import { initAppStaticData } from './initialization/InitAppStaticData'
import '@toast-ui/editor/dist/i18n/zh-cn'

const App = defineAsyncComponent(() => import('./App.vue'))

const initAdapter = new InitAdapter()

initAdapter.addInit(() => initAppStaticData())

initAdapter.setAppVmFn(() => {
  const app = createApp(App)
  app.use(createPinia())
  app.use(router)
  app.mount('#app')
})

initAdapter.init()
